import Vue from 'vue'
import Vuex from 'vuex'
import defaultstate from './defaultstate'
import defaultMutations from './defaultMutations'
import defaultActions from './defaultActions'
import defaultGetters from './defaultGetters'
// 导入modules嵌套模块
import  LoginModule from './modules/loginModule'

Vue.use(Vuex)
// 创建Store仓库
export default new Vuex.Store({
  state: defaultstate,
  mutations: defaultMutations,
  actions: defaultActions,
  getters:defaultGetters,
  modules: {
     // 他能完整的拥有整个vuex的结构
    LoginModule
  }
})
